<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{{url_for('static',filename='bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{url_for('static',filename='register.css')}}">
    <link rel="stylesheet" href="{{url_for('static',filename='register.css')}}">
    <link rel="stylesheet" href="{{url_for('static',filename='bootstrap-datetimepicker.min.css')}}">

    <script src="{{url_for('static',filename='bootstrap.min.js')}}"></script>
    <script src="{{url_for('static',filename='jquery.min.js')}}"></script>
    <script src="{{url_for('static',filename='popper.min.js')}}"></script>
    <script src="{{url_for('static',filename='bootstrap-datetimepicker.min.js')}}"></script>
    <script src="{{url_for('static',filename='register.js')}}"></script>
    <title>请注册</title>
</head>

<body>
    <div id="login_main">
        <form action="" method="POST">
            <div class="login">

                <div class="login_top"> <span>注册一个免费账号</span></div>

                {% for i in get_flashed_messages()%}
                <div class="alert alert-warning alert-dismissible fade show" role="alert">
                    {{i}}
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                      <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                {% endfor %}


                <div class="form-group">
                    <label for="">用户账号</label>
                    {{ form.csrf_token }}
                    {{form.hidden_tag()}}
                    {{form.user_id}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group">
                    <label for="">用户名</label>
                    {{form.user_name}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group">
                    <label for="">密码</label>
                    {{form.user_password1}}
                </div>

                <div class="form-group">
                    <label for="">再次输入密码</label>
                    {{form.user_password2}}
                </div>

                <div class="form-group">
                    <label for="">真实姓名</label>
                    {{form.user_truename}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group form-check-inline">
                    {{form.user_sex.label}}
                    {{form.user_sex}}
                </div>

                <div class="form-group">
                    <label for="">邮箱地址</label>
                    {{form.user_email}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group">
                    <label for="">手机号码</label>
                    {{form.user_phonenumber}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group">
                    <label for="">出生日期</label>
                    {{form.user_birthday(id="datetime")}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <div class="form-group">
                    <label for="">职业</label>
                    {{form.user_profession}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>


                <div class="form-group">
                    <label for="">所属单位</label>
                    {{form.user_units}}
                </div>

                <div class="form-group">
                    <label for="">通信地址</label>
                    {{form.user_location}}
                    <small id="emailHelp" class="form-text text-muted"></small>
                </div>

                <button type="submit" class="btn btn-primary main_button1">
                    <a class="text-light" href="{{url_for('loginview.login')}}">
                        登录
                    </a>
                </button>
                {{ form.errors }}
                {{form.submit}}

            </div>
        </form>
    </div>

    </div>
</body>

</html>